import axios from '../../axios';
const STUDENTS_URL = '/admins';

const adminsApi = {
  login(data) {
    return axios({
      url: STUDENTS_URL + '/AdminLogin',
      method: 'post',
      data,
    });
  },
  getAllAdmins(data) {
    return axios({
      url: STUDENTS_URL + '/getAllAdmins',
      method: 'post',
      data,
    });
  },
  addOneAdmin(data) {
    return axios({
      url: STUDENTS_URL + '/addOneAdmin',
      method: 'post',
      data,
    });
  },
  deleteOneAdmin(_id) {
    return axios({
      url: STUDENTS_URL + '/deleteOneAdmin',
      method: 'post',
      data: { _id },
    });
  },
  getOneAdmin(_id) {
    return axios({
      url: STUDENTS_URL + '/getOneAdmin',
      method: 'post',
      data: { _id },
    });
  },
  updateOneAdmin(data) {
    return axios({
      url: STUDENTS_URL + '/updateOneAdmin',
      method: 'post',
      data,
    });
  },
};
export default adminsApi;
